const http = require("http")

const server = http.createServer((req, res) => {
  console.log(req.url);
  console.log(req.method);
  console.log(req.headers);
  res.end("hello")
})
//0.0.0.0可以监听ipv4地址
server.listen(8000, '0.0.0.0', () => {
  console.log("服务器启动成功");
  console.log(server.address().port);
})